import 'package:flutter/foundation.dart';

class SavePic2GalleryBean {
  ///图片的绝对路径
  String imageAbsolutePath;

  ///是否刷新相册
  bool isNotifyAlbum;

  ///当已存在图片时，是否替换旧图片
  bool isReplaceOld;

  SavePic2GalleryBean({
    @required this.imageAbsolutePath,
    this.isNotifyAlbum = true,
    this.isReplaceOld = false,
  });

  SavePic2GalleryBean.fromJson(Map<String, dynamic> json) {
    this.imageAbsolutePath = json['imageAbsolutePath'];
    this.isNotifyAlbum = json['isNotifyAlbum'];
    this.isReplaceOld = json['isReplaceOld'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['imageAbsolutePath'] = this.imageAbsolutePath;
    data['isNotifyAlbum'] = this.isNotifyAlbum;
    data['isReplaceOld'] = this.isReplaceOld;
    return data;
  }
}
